package com.coderush.admin.sys.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.coderush.admin.sys.model.entity.Company;
import com.coderush.admin.sys.model.entity.Department;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
* @author Administrator
* @description 针对表【sys_department(部门表)】的数据库操作Mapper
* @createDate 2025-08-25 11:11:32
* @Entity com.coderush.admin.sys.model.entity.Department
*/
public interface DepartmentMapper extends BaseMapper<Department> {

    /**
     * 根据部门编码查询部门信息
     * @param deptCode 部门编码
     * @return 部门信息
     */
    Department getByDeptCode(String deptCode);

    Department getByDeptName(Long companyId, String deptName);

    /**
     * 根据部门名称分页查询部门信息
     * @param page 分页参数
     * @param deptName 部门名称
     * @return 部门信息
     */
    Page<Department> findByPage(@Param("page") Page<Department> page, String deptName);
}




